/**
 *  模态框
 * @param dom
 * @constructor
 */
function Modal(dom) {
    this.dom = dom;
    this.content = this.dom.find('.modal-content');
    this.close=this.dom.find('.modal-close');
}
Modal.prototype.init=function () {
    var _this=this;
    this.close.on('click touchstart',function () {
        _this.hide();
    });
};
Modal.prototype.show = function () {
    this.dom.show();
    this.init();
    this.content.addClass('animated bounceIn');
};
Modal.prototype.hide=function () {
    var _this=this;
    this.content.removeClass('bounceIn').addClass('bounceOut');
    setTimeout(function () {
        _this.dom.hide();
    },500);
};